#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtGui/QGraphicsSimpleTextItem>


MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ui->graphicsView->setRenderHints(QPainter::Antialiasing);
    ui->graphicsView->setBackgroundBrush(QBrush(Qt::white, Qt::SolidPattern));
    scene=new QGraphicsScene(QRectF(QPointF(0,0),QSizeF(ui->graphicsView->width()-4
                                                        ,ui->graphicsView->height()-4)));

    ui->graphicsView->setScene(scene);
    grapher = new SimpleDrawer(scene);
    grapher->Draw();
}

MainWindow::~MainWindow()
{
    delete ui;
    delete grapher;
}


void MainWindow::on_pushButton_2_clicked()
{

}
